3.1.80 \(\int \frac {A+B x^2}{(a+b x^2)^2} \, dx\)

Optimal. Leaf size=63 \[ \frac {(a B+A b) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {x (A b-a B)}{2 a b \left (a+b x^2\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {385, 205} \begin {gather*} \frac {(a B+A b) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {x (A b-a B)}{2 a b \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(a + b*x^2)^2,x]

[Out]

((A*b - a*B)*x)/(2*a*b*(a + b*x^2)) + ((A*b + a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(3/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps

\begin {align*} \int \frac {A+B x^2}{\left (a+b x^2\right )^2} \, dx &=\frac {(A b-a B) x}{2 a b \left (a+b x^2\right )}+\frac {(A b+a B) \int \frac {1}{a+b x^2} \, dx}{2 a b}\\ &=\frac {(A b-a B) x}{2 a b \left (a+b x^2\right )}+\frac {(A b+a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 63, normalized size = 1.00 \begin {gather*} \frac {(a B+A b) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}-\frac {x (a B-A b)}{2 a b \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(a + b*x^2)^2,x]

[Out]

-1/2*((-(A*b) + a*B)*x)/(a*b*(a + b*x^2)) + ((A*b + a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(3/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x^2}{\left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x^2)/(a + b*x^2)^2,x]

[Out]

IntegrateAlgebraic[(A + B*x^2)/(a + b*x^2)^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 182, normalized size = 2.89 \begin {gather*} \left [-\frac {{\left (B a^{2} + A a b + {\left (B a b + A b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, {\left (B a^{2} b - A a b^{2}\right )} x}{4 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}, \frac {{\left (B a^{2} + A a b + {\left (B a b + A b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - {\left (B a^{2} b - A a b^{2}\right )} x}{2 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*((B*a^2 + A*a*b + (B*a*b + A*b^2)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 2*(B*a
^2*b - A*a*b^2)*x)/(a^2*b^3*x^2 + a^3*b^2), 1/2*((B*a^2 + A*a*b + (B*a*b + A*b^2)*x^2)*sqrt(a*b)*arctan(sqrt(a
*b)*x/a) - (B*a^2*b - A*a*b^2)*x)/(a^2*b^3*x^2 + a^3*b^2)]

________________________________________________________________________________________

giac [A]  time = 0.29, size = 57, normalized size = 0.90 \begin {gather*} \frac {{\left (B a + A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} - \frac {B a x - A b x}{2 \, {\left (b x^{2} + a\right )} a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(B*a + A*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b) - 1/2*(B*a*x - A*b*x)/((b*x^2 + a)*a*b)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 68, normalized size = 1.08 \begin {gather*} \frac {A \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a}+\frac {B \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {\left (A b -B a \right ) x}{2 \left (b \,x^{2}+a \right ) a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/(b*x^2+a)^2,x)

[Out]

1/2*(A*b-B*a)*x/a/b/(b*x^2+a)+1/2/a/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*A+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(
1/2)*b*x)*B

________________________________________________________________________________________

maxima [A]  time = 2.41, size = 57, normalized size = 0.90 \begin {gather*} -\frac {{\left (B a - A b\right )} x}{2 \, {\left (a b^{2} x^{2} + a^{2} b\right )}} + \frac {{\left (B a + A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(B*a - A*b)*x/(a*b^2*x^2 + a^2*b) + 1/2*(B*a + A*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b)

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 51, normalized size = 0.81 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (A\,b+B\,a\right )}{2\,a^{3/2}\,b^{3/2}}+\frac {x\,\left (A\,b-B\,a\right )}{2\,a\,b\,\left (b\,x^2+a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x^2)/(a + b*x^2)^2,x)

[Out]

(atan((b^(1/2)*x)/a^(1/2))*(A*b + B*a))/(2*a^(3/2)*b^(3/2)) + (x*(A*b - B*a))/(2*a*b*(a + b*x^2))

________________________________________________________________________________________

sympy [B]  time = 0.40, size = 112, normalized size = 1.78 \begin {gather*} \frac {x \left (A b - B a\right )}{2 a^{2} b + 2 a b^{2} x^{2}} - \frac {\sqrt {- \frac {1}{a^{3} b^{3}}} \left (A b + B a\right ) \log {\left (- a^{2} b \sqrt {- \frac {1}{a^{3} b^{3}}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{3} b^{3}}} \left (A b + B a\right ) \log {\left (a^{2} b \sqrt {- \frac {1}{a^{3} b^{3}}} + x \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/(b*x**2+a)**2,x)

[Out]

x*(A*b - B*a)/(2*a**2*b + 2*a*b**2*x**2) - sqrt(-1/(a**3*b**3))*(A*b + B*a)*log(-a**2*b*sqrt(-1/(a**3*b**3)) +
 x)/4 + sqrt(-1/(a**3*b**3))*(A*b + B*a)*log(a**2*b*sqrt(-1/(a**3*b**3)) + x)/4

________________________________________________________________________________________